<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="id" lang="id">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script>
		window.addEvent('domready', function(){ 
			new Picker.Date('vista1', {
				pickerClass: 'datepicker_vista'
			});
			new Picker.Date('vista2', {
				pickerClass: 'datepicker_vista'
			});
		});
	</script>
<title></title> 
</head>
<body>
	<html:form action="/candidateUpdate.do" method="post" enctype="multipart/form-data">
	<html:hidden property="id"/>
	<table width="99%" cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td style="width: 15%;" valign="top">
					<jsp:include page="../common/leftMenuCandidate.jsp" />
				</td>

				<td style="width: 83%;" valign="top" >
				
		<div class="outerbox" style="min-width: 600px;">
			<div class="mainHeading">
				<div class=""
					style="width: 320px; height: 32px; background: url(images/formTitleBackground.png) no-repeat top right; font-color: #CC0000;">
					<h2 class="formTitle">PERSONAL INFO</h2>
				</div>
			</div>
			<div class="searchbox">
					<div id="formcontent">
						<br class="clear" />
						<table style="width: 100%; padding-bottom: 10px;">
							<tr>
								<td class="txtLabel"><label>Last Name: *</label></td>
								<td><html:text property="lastName" style="width:200px;"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Middle Name</label></td>
								<td><html:text property="middleName" style="width:200px;"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>First Name: *</label></td>
								<td><html:text property="firstName" style="width:200px;"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Email</label></td>
								<td> <html:text property="email" style="width:200px;"></html:text> </td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Contact Number</label></td>
								<td> <html:text property="contactNumber" style="width:200px;"></html:text> </td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Image </label></td>
								<td><html:file property="image" style="width:220px;background-color:white;"/></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>CV File </label></td>
								<td><html:file property="cvFile" style="width:220px;background-color:white;"/></td>
							</tr>
							<tr>
								<td colspan="6"><hr/></td>
								<td></td>
								<td></td>
								<td></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>ID Card Number</label></td>
								<td><html:text property="idCardNumber" style="width:200px;"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Date of Issuance</label></td>
								<td><html:text property="idCardDateIssued" style="width:200px;" styleId="vista1"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Place of Issuance</label></td>
								<td>
									<html:select name="candidateUpdate" property="idCardLocationIssued" style="width:200px;">
										<html:optionsCollection property="allProvinces" label="label" value="value" />
									</html:select>
								</td>
							</tr>
							<tr>
							<td colspan="6"><hr/></td>
								<td></td>
								<td></td>
								<td></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Gender</label></td>
								<td>
									<html:select property="gender" style="width:200px;">
									 	<html:optionsCollection property="allGenders" label="label" value="value" />
									</html:select>
								</td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Marital Status</label></td>
								<td>
									<html:select property="maritalStatus" style="width:200px;">
										<html:optionsCollection property="allMaritalStatuses" label="label" value="value" />
									</html:select>
								</td>
							</tr>
							<tr>
							<td colspan="6"><hr/></td>
								<td></td>
								<td></td>
								<td></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Address</label></td>
								<td><html:text property="addressStreet" style="width:200px;"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Province</label></td>
								<td>
									<html:select styleId="provinceId" name="candidateUpdate" property="provinceCode" styleClass="readonly" style="width:200px;" onchange="linkedComboBox('provinceId', 'districtId');">
										<html:optionsCollection property="allProvinces" label="label" value="value" />
									</html:select>
								</td>
							</tr>
							<tr>
								<td class="txtLabel"><label>District</label></td>
								<td>
									<html:select styleId="districtId" name="candidateUpdate" property="districtCode" styleClass="readonly" style="width:200px;">
										<html:optionsCollection property="allDistricts" label="label" value="value" />
									</html:select>
								</td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Nationality</label></td>
								<td>
									<html:select property="nationality" style="width:200px;">
										<html:optionsCollection property="allNationalities" label="label" value="value" />
									</html:select>
								</td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Date of Birth</label></td>
								<td><html:text property="dateOfBirth" style="width:200px;" styleId="vista2"></html:text></td>
							</tr>
							<tr>
							<td colspan="6"><hr/></td>
								<td></td>
								<td></td>
								<td></td>
							</tr>
							<tr>
								<logic:equal name="candidateUpdate" value="true" property="success">
									<td colspan="2"><a style="color: blue; padding-left: 335px;"><bean:write name="candidateUpdate" property="message"/></a></td>
								</logic:equal>
								<logic:equal name="candidateUpdate" value="false" property="success">
									<td colspan="2"><a style="color: red; padding-left: 335px;"><bean:write name="candidateUpdate" property="message"/></a></td>
								</logic:equal>
							</tr>
						</table>
					</div>
					<div class="actionbar_form" style="border-top: 2px solid #191919;">
						<div class="actionbuttons">
							<html:submit styleClass="plainbtn" property="btnUpdate" value="Update">Update</html:submit> 
							<html:reset styleClass="plainbtn">Reset</html:reset>
						</div>
					</div>
					<br class="clear" />
			</div>
		</div>
		</td>
		</tr>
		</table>
	</html:form>
</body>
</html>